﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>打印页面的出错原因</title>
    <script type="text/javascript" language="JavaScript">
        function getError(){
            try{
                x = new test;   // 产生结果
            }catch(e){
                document.write(e.description);  // 打印错误结果
            }
        }
    </script>
</head>
<body onload="getError()">

</body>
</html>